package xin.sunzy.ssms.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xin.sunzy.ssms.dao.intf.IUserDao;
import xin.sunzy.ssms.entity.po.User;
import xin.sunzy.ssms.service.intf.IUserService;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author Ginkgo
 * @Description :
 * @Date 2017/8/11 19:29
 * @since ${VERSION}
 */
@Service("userService")
public class UserService implements IUserService {

    @Autowired
    private IUserDao userDao;

    @Override
    public User findByUsername(String username) throws Exception {
        try{
            return userDao.getUserByUsername(username);
        } catch (Exception e) {
            throw new Exception("数据库操作异常",e);
        }
    }
}
